package expressions.slogo;

import java.util.List;
import parsing.Separates;
import parsing.Token;
import expressions.Operator;

@Token(regex = ">")
@Separates
public class GreaterThan extends Operator<Double>
{
    public GreaterThan()
    {
        super(2);
    }

    @Override
    public int priority()
    {
        return Priority.RELATIONAL.adjust(Modifier.MIDDLE);
    }

    @Override
    protected Double combineResults(List<Double> results)
    {
        return BooleanConstant.toDouble(results.get(0) > results.get(1));
    }

}
